/*
 * Copyright (C) 2010-2011 Comcast Cable.  All Rights Reserved.
 */
package com.hercules.android.receiver.model.commands;

import java.util.LinkedHashMap;
import java.util.Map;

/**
 * <p>
 * This is a subclass of {@link XRETargetCommand} that represents a SET XRE command. It defines some properties specific
 * to this command. According to XRE protocol specification, this command is used for setting runtime properties of XRE
 * objects. It is a simple JavaBean (POJO) that provides getters and setters for all private attributes and performs no
 * argument validation in the setters.
 * </p>
 * <p>
 * AndroidAssembly1 this class now extends {@link XRETargetCommand}
 * <p>
 * <strong>Thread safety:</strong> This class is mutable and not thread safe.
 * </p>
 *
 * @author saarixx, jmn
 * @author 7realm
 * @version 1.0
 */
public class XRESetCommand extends XRETargetCommand {

    /**
     * <p>
     * The command name associated with this class.
     * </p>
     * <p>
     * Immutable string constant.
     * </p>
     * <p>
     * Is used in getCommand().
     * </p>
     */
    public static final String COMMAND_NAME = "SET";

    /**
     * <p>
     * The map with the runtime properties to be set. Keys are property names, values - new property values.
     * </p>
     * <p>
     * Can be any value, can contain any values.
     * </p>
     * <p>
     * Has getter and setter.
     * </p>
     */
    private Map<String, Object> props = new LinkedHashMap<String, Object>();

    /**
     * <p>
     * Creates new instance of {@link XRESetCommand} class.
     * </p>
     */
    public XRESetCommand() {
        // empty constructor
    }

    /**
     * <p>
     * Retrieves the name of this command.
     * </p>
     *
     * @return the name of this command
     */
    @Override
    public String getCommand() {
        return COMMAND_NAME;
    }

    /**
     * <p>
     * Retrieves the map with the runtime properties to be set.
     * </p>
     *
     * @return the map with the runtime properties to be set
     */
    public Map<String, Object> getProps() {
        return props;
    }

    /**
     * <p>
     * Sets the map with the runtime properties to be set.
     * </p>
     *
     * @param props the map with the runtime properties to be set
     */
    public void setProps(Map<String, Object> props) {
        this.props = props;
    }
}
